<template>
  <el-tabs
    v-model="activeName"
    :style="{ height: '112px' }"
    @tab-click="handleClick"
  >
    <el-tab-pane label="我的办公桌" name="first"><officeTable /></el-tab-pane>
    <el-tab-pane label="客户信息" name="second"><client /></el-tab-pane>
    <el-tab-pane label="业务流程" name="third"><sideBar /></el-tab-pane>
    <el-tab-pane label="行政中心" name="fourth"><officeCenter /></el-tab-pane>
    <el-tab-pane label="系统设置" name="fifth"><setting /></el-tab-pane>
  </el-tabs>
</template>

<script>
import officeTable from '../../views/officeTable/index.vue'
import sideBar from '../sidebar/index.vue'
import officeCenter from '../../views/officeCenter'
import router from '@/router'
import setting from '../../views/setting'
import client from '../../views/client/index.vue'
export default {
  data() {
    return {
      activeName: 'first',
    }
  },
  // 局部注册
  components: {
    sideBar,
    officeTable,
    officeCenter,
    client,
    setting,
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event)
      console.log(tab.index)
      switch (tab.index) {
        case '3':
          router.push('/officeCenter/applyfunt')
          console.log('跳转')
      }
    },
  },
}
</script>
